<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="cn.edu.ecut.se2024.User.purchase" %>
    <%@ page import="java.util.List" %>
    <%@ page import="java.util.Iterator" %>
    
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>要货单</title>
</head>
<body>
<table border="1">
<tr>
<th>单号</th><th>供应商</th><th>商品号</th><th>商品名</th><th>商品数量</th><th>商品价格</th>
</tr>
<%
	List<purchase> p=(List<purchase>)request.getAttribute("p");
if (p != null) {
	for(purchase p1:p){

%>
<tr>
<td><a href="QuerypruchaseBySnoServlet?sno=<%=p1.getNumber() %>">
<%=p1.getNumber() %></a></td>
<td><%=p1.getSupplier() %></td>
<td><%=p1.getpID() %></td>
<td><%=p1.getPname() %></td>
<td><%=p1.getPquantity() %></td>
<td><%=p1.getPprice() %></td>
<td><a href="DeletepurchaseServlet?sno=<%=p1.getNumber() %>">删除</a></td></tr>
<%}}%>
</table>
<a href="add.jsp">新增</a>

</body>
</html>